Skip to content

docs(modules): lead with root placement for module manifests#80

Open
bmadcode wants to merge 1 commit intomainfrom
docs-module-root-placement
Open

docs(modules): lead with root placement for module manifests#80
bmadcode wants to merge 1 commit intomainfrom
docs-module-root-placement

Conversation

@bmadcode
Copy link
Copy Markdown
Contributor

@bmadcode bmadcode commented Apr 27, 2026

Summary

  • Restructure the BMB module docs to teach root placement (module.yaml and module-help.csv at the module root, alongside skill folders) as the default layout, matching how the official BMad modules ship today and what the BMad installer prefers.
  • Reframe the setup skill and self-registering single-skill layouts as alternatives for direct-download distribution, not the primary patterns.
  • Add a "Skills Must Be Self-Runnable" principle to skill-authoring-best-practices.md: registration manifests are metadata, not runtime dependencies, so every skill must work whether installed via the BMad installer or copied directly into a project.

Files updated:

  • docs/explanation/skill-authoring-best-practices.md (new principle)
  • docs/explanation/what-are-modules.md (root-first structure + alternatives table)
  • docs/explanation/module-configuration.md (three-layout table, retitled)
  • docs/how-to/distribute-your-module.md (root layout first, alternatives second)
  • docs/tutorials/build-your-first-module.md (root layout first)
  • docs/reference/builder-commands.md (Create Module / Validate Module updates)

Test plan

  • Read each updated doc end-to-end to confirm the narrative flows correctly with root placement as the default
  • Confirm cross-doc references still resolve (e.g., the new #skills-must-be-self-runnable anchor)
  • Verify the directory diagrams match the layout shipped by bmm and cis today
  • Build the docs site locally and check rendering

Summary by CodeRabbit

  • Documentation
    • Updated module registration guidance to emphasize default root-based manifest placement over alternative layouts
    • Added best practices requiring skills to support runtime self-sufficiency without installer-only dependencies
    • Revised Module Builder documentation to reflect simplified module creation workflow
    • Clarified module structure and distribution options for both installer and direct-download scenarios

Restructure module docs to teach root placement (module.yaml and
module-help.csv at the module root, alongside skill folders) as the
default layout. The setup skill and self-registering single-skill
layouts are now framed as alternatives for direct-download
distribution rather than the primary patterns.

Adds a "Skills Must Be Self-Runnable" principle to skill authoring
best practices: registration manifests are metadata, not runtime
dependencies, so every skill must work whether installed via the
BMad installer or copied directly into a project.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

Walkthrough

Documentation across five files is reframed from "setup skill vs standalone" to "module registration layouts," establishing root placement of module.yaml and module-help.csv as the default installer-driven approach, with setup-skill and self-registering skill layouts described as alternatives for direct-download distribution. Module Builder semantics are updated to generate manifests at module root rather than detecting structural patterns.

Changes

Cohort / File(s) Summary
Foundational Concepts
docs/explanation/what-are-modules.md, docs/explanation/skill-authoring-best-practices.md
Unified module concept around root manifest placement; added runtime self-sufficiency requirements for skills (avoid installer-only dependencies, handle missing config values by prompting users).
Configuration Guidance
docs/explanation/module-configuration.md
Reframed from setup-skill focus to three-layout table (installer priority, manifest location); prefers root-based module.yaml with conditional placement for direct download; updated "skip" logic to allow skipping module-level registration.
Distribution & Setup
docs/how-to/distribute-your-module.md
Updated layouts to show root manifests as recommended structure; added multi-module marketplace repository examples; expanded direct-download guidance; shifted external-dependency detection from installer-time to runtime skill-time.
Module Builder Reference
docs/reference/builder-commands.md
Create/Validate commands changed from single-vs-multi detection to layout confirmation; generates module.yaml, module-help.csv, .claude-plugin/marketplace.json at root by default; added opt-in direct-download layout paths.
Tutorial
docs/tutorials/build-your-first-module.md
Module-creation flow reframed around root manifests as default; removed detailed setup-skill/self-registration structure examples; added direct-download bundling guidance; updated installation wording to reflect installer-handled registration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 A module finds its rightful place—
At root, where manifests embrace,
No setup dance, no hidden lay,
Just honest declarations bright,
And skills that handle their own plight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main objective: restructuring module documentation to emphasize root placement of manifests as the default approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-module-root-placement

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/how-to/distribute-your-module.md`:
- Around line 77-100: The diagram contradicts the “module root” rule by showing
module.yaml and module-help.csv under skills/; update the example tree and
surrounding text so module.yaml and module-help.csv are placed at the actual
module root (next to .claude-plugin/marketplace.json), and make the manifest
example (e.g., source: "./") consistent with that layout; specifically revise
the ASCII tree to show module.yaml and module-help.csv at my-module/ (not inside
skills/), and adjust any explanatory lines that reference “module root” to match
this placement.

In `@docs/reference/builder-commands.md`:
- Around line 323-324: Update the "Create Module" capability summary row (label
"Create Module" / "CM") to correct the manifest location wording: replace the
claim that marketplace.json is generated "at the module root" with the accurate
path (for example ".claude-plugin/marketplace.json") or clarify that it is
placed under the .claude-plugin directory (or bundled into a skill for
direct-download distribution), so the row consistently references module.yaml,
module-help.csv, and the .claude-plugin/marketplace.json location.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ea26c64a-3ff9-41ac-9b27-f5a609c05b1e

📥 Commits

Reviewing files that changed from the base of the PR and between 86033fc and cb97177.

📒 Files selected for processing (6)
  • docs/explanation/module-configuration.md
  • docs/explanation/skill-authoring-best-practices.md
  • docs/explanation/what-are-modules.md
  • docs/how-to/distribute-your-module.md
  • docs/reference/builder-commands.md
  • docs/tutorials/build-your-first-module.md

Comment on lines +77 to +100
Organize the repository so skills can be located relative to `marketplace.json`. The recommended layout places `module.yaml` and `module-help.csv` at the **module root**, alongside the skill folders. This is how the official BMad modules ship today.

### Single-module repository
### Single-module repository (recommended)

```
my-module/
├── .claude-plugin/
│ └── marketplace.json
├── skills/
│ ├── module.yaml # Registration manifests at module root
│ ├── module-help.csv
│ ├── my-agent/
│ │ ├── SKILL.md
│ │ ├── prompts/
│ │ └── scripts/
│ └── my-workflow/
│ ├── SKILL.md
│ └── prompts/
├── README.md
└── LICENSE
```

In this layout, the BMad installer reads `module.yaml` and `module-help.csv` directly from the module root. No setup skill is needed; the installer handles agent registration, help registration, and any cross-project config from these two files.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Layout example conflicts with your own “module root” rule.

Lines 77 and 99 define root placement, but the diagram puts module.yaml/module-help.csv under skills/. That conflicts with the manifest example (source: "./") and can lead to incorrect repository structure.

Suggested doc fix (single-module recommended tree)
 my-module/
 ├── .claude-plugin/
 │   └── marketplace.json
-├── skills/
-│   ├── module.yaml             # Registration manifests at module root
-│   ├── module-help.csv
-│   ├── my-agent/
-│   │   ├── SKILL.md
-│   │   ├── prompts/
-│   │   └── scripts/
-│   └── my-workflow/
-│       ├── SKILL.md
-│       └── prompts/
+├── module.yaml                 # Registration manifests at module root
+├── module-help.csv
+├── my-agent/
+│   ├── SKILL.md
+│   ├── prompts/
+│   └── scripts/
+├── my-workflow/
+│   ├── SKILL.md
+│   └── prompts/
 ├── README.md
 └── LICENSE

Based on learnings: "Applies to */module.yaml : Module metadata must be defined in module.yaml at the root of the module with installation config and variables".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/how-to/distribute-your-module.md` around lines 77 - 100, The diagram
contradicts the “module root” rule by showing module.yaml and module-help.csv
under skills/; update the example tree and surrounding text so module.yaml and
module-help.csv are placed at the actual module root (next to
.claude-plugin/marketplace.json), and make the manifest example (e.g., source:
"./") consistent with that layout; specifically revise the ASCII tree to show
module.yaml and module-help.csv at my-module/ (not inside skills/), and adjust
any explanatory lines that reference “module root” to match this placement.

Comment on lines +323 to +324
| **Create Module** | CM | Generate `module.yaml`, `module-help.csv`, and `marketplace.json` at the module root (or bundled into a skill for direct-download distribution) |
| **Validate Module** | VM | Check structural integrity and entry quality |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix manifest location wording in capability summary.

Line 323 says marketplace.json is generated at the module root, but this file later documents .claude-plugin/marketplace.json. Align this row to avoid incorrect file placement guidance.

Suggested doc fix
-| **Create Module**   | CM        | Generate `module.yaml`, `module-help.csv`, and `marketplace.json` at the module root (or bundled into a skill for direct-download distribution) |
+| **Create Module**   | CM        | Generate `module.yaml`, `module-help.csv`, and `.claude-plugin/marketplace.json` (or bundle manifests into a skill for direct-download distribution) |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| **Create Module** | CM | Generate `module.yaml`, `module-help.csv`, and `marketplace.json` at the module root (or bundled into a skill for direct-download distribution) |
| **Validate Module** | VM | Check structural integrity and entry quality |
| **Create Module** | CM | Generate `module.yaml`, `module-help.csv`, and `.claude-plugin/marketplace.json` (or bundle manifests into a skill for direct-download distribution) |
| **Validate Module** | VM | Check structural integrity and entry quality |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/reference/builder-commands.md` around lines 323 - 324, Update the
"Create Module" capability summary row (label "Create Module" / "CM") to correct
the manifest location wording: replace the claim that marketplace.json is
generated "at the module root" with the accurate path (for example
".claude-plugin/marketplace.json") or clarify that it is placed under the
.claude-plugin directory (or bundled into a skill for direct-download
distribution), so the row consistently references module.yaml, module-help.csv,
and the .claude-plugin/marketplace.json location.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 27, 2026

🤖 Augment PR Summary

Summary: Updates the module documentation to treat “root placement” of module registration manifests as the default, with setup-skill and self-registering layouts as direct-download alternatives.

Changes:

  • Retitles/reframes module configuration docs around registration and manifest placement choices.
  • Adds a “Skills Must Be Self-Runnable” best-practice principle to decouple runtime behavior from registration.
  • Rewrites “What are modules?” to describe module.yaml / module-help.csv as module-level metadata and explains root placement rationale.
  • Updates distribution guidance with root-first repository layouts and direct-download fallback patterns.
  • Adjusts the Build Your First Module tutorial to teach manifest generation as the primary CM output.
  • Updates the Builder Commands reference language for Create Module / Validate Module accordingly.

Technical notes: Emphasizes manifests as installer/bmad-help metadata (not runtime dependencies), and frames skills as runnable whether installed via installer or copied directly.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

## Configuration Files

Setup skills write to three files in `{project-root}/_bmad/`:
Module registration writes to three files in `{project-root}/_bmad/`:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/explanation/module-configuration.md:55 — This page mentions _bmad/config.toml / config.user.toml earlier, but here it documents config.yaml / config.user.yaml as the registration outputs. Consider making the file format/extension consistent across the page so users don’t write config to the wrong filenames.

Severity: medium

Generating Fix in Augment link...

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

6. Writes the manifests and distribution scaffolding

**Multi-skill output:** A dedicated `{code}-setup/` folder with merge scripts, cleanup scripts, and a generic SKILL.md.
**Default output (root placement):** `module.yaml` and `module-help.csv` at the module root, plus `.claude-plugin/marketplace.json`. The BMad installer reads these directly. No setup skill or merge scripts are generated.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/reference/builder-commands.md:370 — This says Create Module’s default output is root module.yaml/module-help.csv with no setup skill/merge scripts, and VM auto-detects that layout, but the current Module Builder assets/scripts in this repo still scaffold/validate the *-setup/assets/ (or standalone assets/) layouts. If the tooling behavior hasn’t changed yet, these docs may mislead users about what CM/VM will generate/accept.

Severity: medium

Other Locations
  • docs/explanation/module-configuration.md:6
  • docs/explanation/module-configuration.md:183
  • docs/tutorials/build-your-first-module.md:84
  • docs/tutorials/build-your-first-module.md:147
  • docs/explanation/what-are-modules.md:143

Generating Fix in Augment link...

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

## Step 2: Structure Your Repository

Organize the repository so skills can be located relative to `marketplace.json`.
Organize the repository so skills can be located relative to `marketplace.json`. The recommended layout places `module.yaml` and `module-help.csv` at the **module root**, alongside the skill folders. This is how the official BMad modules ship today.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/how-to/distribute-your-module.md:77 — The text calls for manifests at the “module root”, but the single-module example places module.yaml/module-help.csv under skills/ while the manifest example uses plugins[].source: "./". Consider clarifying which directory is treated as the module root by the installer so readers don’t end up with a valid marketplace manifest but manifests in an unexpected location.

Severity: low

Generating Fix in Augment link...

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant